3.1 \(\int (a+b \sec ^2(e+f x)) \sin ^7(e+f x) \, dx\)

Optimal. Leaf size=83 \[ -\frac{(3 a-b) \cos ^5(e+f x)}{5 f}+\frac{(a-b) \cos ^3(e+f x)}{f}-\frac{(a-3 b) \cos (e+f x)}{f}+\frac{a \cos ^7(e+f x)}{7 f}+\frac{b \sec (e+f x)}{f} \]

[Out]

-(((a - 3*b)*Cos[e + f*x])/f) + ((a - b)*Cos[e + f*x]^3)/f - ((3*a - b)*Cos[e + f*x]^5)/(5*f) + (a*Cos[e + f*x
]^7)/(7*f) + (b*Sec[e + f*x])/f

________________________________________________________________________________________

Rubi [A]  time = 0.0614125, antiderivative size = 83, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {4133, 448} \[ -\frac{(3 a-b) \cos ^5(e+f x)}{5 f}+\frac{(a-b) \cos ^3(e+f x)}{f}-\frac{(a-3 b) \cos (e+f x)}{f}+\frac{a \cos ^7(e+f x)}{7 f}+\frac{b \sec (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x]^2)*Sin[e + f*x]^7,x]

[Out]

-(((a - 3*b)*Cos[e + f*x])/f) + ((a - b)*Cos[e + f*x]^3)/f - ((3*a - b)*Cos[e + f*x]^5)/(5*f) + (a*Cos[e + f*x
]^7)/(7*f) + (b*Sec[e + f*x])/f

Rule 4133

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p)/(ff*x)^(n*
p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rule 448

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandI
ntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[p, 0] && IGtQ[q, 0]

Rubi steps

\begin{align*} \int \left (a+b \sec ^2(e+f x)\right ) \sin ^7(e+f x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{\left (1-x^2\right )^3 \left (b+a x^2\right )}{x^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (a \left (1-\frac{3 b}{a}\right )+\frac{b}{x^2}-3 (a-b) x^2+(3 a-b) x^4-a x^6\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{(a-3 b) \cos (e+f x)}{f}+\frac{(a-b) \cos ^3(e+f x)}{f}-\frac{(3 a-b) \cos ^5(e+f x)}{5 f}+\frac{a \cos ^7(e+f x)}{7 f}+\frac{b \sec (e+f x)}{f}\\ \end{align*}

Mathematica [A]  time = 0.0836027, size = 120, normalized size = 1.45 \[ -\frac{35 a \cos (e+f x)}{64 f}+\frac{7 a \cos (3 (e+f x))}{64 f}-\frac{7 a \cos (5 (e+f x))}{320 f}+\frac{a \cos (7 (e+f x))}{448 f}+\frac{19 b \cos (e+f x)}{8 f}-\frac{3 b \cos (3 (e+f x))}{16 f}+\frac{b \cos (5 (e+f x))}{80 f}+\frac{b \sec (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x]^2)*Sin[e + f*x]^7,x]

[Out]

(-35*a*Cos[e + f*x])/(64*f) + (19*b*Cos[e + f*x])/(8*f) + (7*a*Cos[3*(e + f*x)])/(64*f) - (3*b*Cos[3*(e + f*x)
])/(16*f) - (7*a*Cos[5*(e + f*x)])/(320*f) + (b*Cos[5*(e + f*x)])/(80*f) + (a*Cos[7*(e + f*x)])/(448*f) + (b*S
ec[e + f*x])/f

________________________________________________________________________________________

Maple [A]  time = 0.047, size = 102, normalized size = 1.2 \begin{align*}{\frac{1}{f} \left ( -{\frac{a\cos \left ( fx+e \right ) }{7} \left ({\frac{16}{5}}+ \left ( \sin \left ( fx+e \right ) \right ) ^{6}+{\frac{6\, \left ( \sin \left ( fx+e \right ) \right ) ^{4}}{5}}+{\frac{8\, \left ( \sin \left ( fx+e \right ) \right ) ^{2}}{5}} \right ) }+b \left ({\frac{ \left ( \sin \left ( fx+e \right ) \right ) ^{8}}{\cos \left ( fx+e \right ) }}+ \left ({\frac{16}{5}}+ \left ( \sin \left ( fx+e \right ) \right ) ^{6}+{\frac{6\, \left ( \sin \left ( fx+e \right ) \right ) ^{4}}{5}}+{\frac{8\, \left ( \sin \left ( fx+e \right ) \right ) ^{2}}{5}} \right ) \cos \left ( fx+e \right ) \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e)^2)*sin(f*x+e)^7,x)

[Out]

1/f*(-1/7*a*(16/5+sin(f*x+e)^6+6/5*sin(f*x+e)^4+8/5*sin(f*x+e)^2)*cos(f*x+e)+b*(sin(f*x+e)^8/cos(f*x+e)+(16/5+
sin(f*x+e)^6+6/5*sin(f*x+e)^4+8/5*sin(f*x+e)^2)*cos(f*x+e)))

________________________________________________________________________________________

Maxima [A]  time = 1.00339, size = 99, normalized size = 1.19 \begin{align*} \frac{5 \, a \cos \left (f x + e\right )^{7} - 7 \,{\left (3 \, a - b\right )} \cos \left (f x + e\right )^{5} + 35 \,{\left (a - b\right )} \cos \left (f x + e\right )^{3} - 35 \,{\left (a - 3 \, b\right )} \cos \left (f x + e\right ) + \frac{35 \, b}{\cos \left (f x + e\right )}}{35 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^7,x, algorithm="maxima")

[Out]

1/35*(5*a*cos(f*x + e)^7 - 7*(3*a - b)*cos(f*x + e)^5 + 35*(a - b)*cos(f*x + e)^3 - 35*(a - 3*b)*cos(f*x + e)
+ 35*b/cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 0.928366, size = 186, normalized size = 2.24 \begin{align*} \frac{5 \, a \cos \left (f x + e\right )^{8} - 7 \,{\left (3 \, a - b\right )} \cos \left (f x + e\right )^{6} + 35 \,{\left (a - b\right )} \cos \left (f x + e\right )^{4} - 35 \,{\left (a - 3 \, b\right )} \cos \left (f x + e\right )^{2} + 35 \, b}{35 \, f \cos \left (f x + e\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^7,x, algorithm="fricas")

[Out]

1/35*(5*a*cos(f*x + e)^8 - 7*(3*a - b)*cos(f*x + e)^6 + 35*(a - b)*cos(f*x + e)^4 - 35*(a - 3*b)*cos(f*x + e)^
2 + 35*b)/(f*cos(f*x + e))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)**2)*sin(f*x+e)**7,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.19947, size = 389, normalized size = 4.69 \begin{align*} \frac{2 \,{\left (\frac{35 \, b}{\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1} + \frac{16 \, a - 77 \, b - \frac{112 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{504 \, b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{336 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac{1337 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac{560 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac{1680 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac{1015 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac{280 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}} - \frac{35 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}}}{{\left (\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 1\right )}^{7}}\right )}}{35 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^7,x, algorithm="giac")

[Out]

2/35*(35*b/((cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1) + (16*a - 77*b - 112*a*(cos(f*x + e) - 1)/(cos(f*x + e)
 + 1) + 504*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 336*a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 1337*b
*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 560*a*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 1680*b*(cos(f*x
 + e) - 1)^3/(cos(f*x + e) + 1)^3 - 1015*b*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 280*b*(cos(f*x + e) - 1
)^5/(cos(f*x + e) + 1)^5 - 35*b*(cos(f*x + e) - 1)^6/(cos(f*x + e) + 1)^6)/((cos(f*x + e) - 1)/(cos(f*x + e) +
 1) - 1)^7)/f